#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdarg.h>

void val_print(int num, ...)
{
    va_list v;

    va_start(v, num);
    for (int i = 0; i < num; ++i) {
        int n = va_arg(v, int);
        printf("%d\n", n);
    }
    va_end(v);
}

int main()
{
    val_print(4, 1, 3, 5, 9);


    return 0;
}